From: Paul Eggert Date: Sun, 20 Mar 2011 03:07:54 +0000 (-0700) Subject: * process.c (create_process): Use 'volatile' to avoid vfork clobbering. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~4324^2~26 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=b1dc0f8c31c4403951ddf2e7032ecb54545cd7f4;p=emacs.git * process.c (create_process): Use 'volatile' to avoid vfork clobbering. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4d146358b80..ed647a2056a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,7 @@ (Fnetwork_interface_info): Fix pointer signedness. (process_send_signal): Add cast to avoid pointer signedness problem. (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. + (create_process): Use 'volatile' to avoid vfork clobbering. 2011-03-19 Paul Eggert diff --git a/src/process.c b/src/process.c index 5bc1707756b..5ee731a5bd3 100644 --- a/src/process.c +++ b/src/process.c @@ -1912,8 +1912,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) /* child_setup must clobber environ on systems with true vfork. Protect it from permanent change. */ char **save_environ = environ; - - current_dir = ENCODE_FILE (current_dir); + volatile Lisp_Object encoded_current_dir = ENCODE_FILE (current_dir); #ifndef WINDOWSNT pid = vfork (); @@ -2054,13 +2053,13 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) child_setup_tty (xforkout); #ifdef WINDOWSNT pid = child_setup (xforkin, xforkout, xforkout, - new_argv, 1, current_dir); + new_argv, 1, encoded_current_dir); #else /* not WINDOWSNT */ #ifdef FD_CLOEXEC emacs_close (wait_child_setup[0]); #endif child_setup (xforkin, xforkout, xforkout, - new_argv, 1, current_dir); + new_argv, 1, encoded_current_dir); #endif /* not WINDOWSNT */ } environ = save_environ;